#include <iostream>
#include <cstdlib>
#include "startRoutine.hpp"
#include "winAbsThreads.h"

ABSRETURN WINAPI	test(ABSPARAM param)
{
	char	*str = (char*)param;
	std::cout << "nouveau thread " << str << std::endl;
	return (0);
}

int		main(void)
{
	winAbsThreads	*thread;
#ifdef WIN32
	thread = new winAbsThreads();
#else
	thread = new unixAbsThreads();
#endif // WIN32
	thread->setStartRoutine(&test);
	thread->setParam("Allo");
	thread->run();
	std::cout << "thread principal" << std::endl;
	thread->setParam("nouveau param");
	thread->run();
	return (0);
}
